package com.kingboy.kbg.uums.rest.account.api;

import com.kingboy.kbg.core.common.base.Result;
import com.kingboy.kbg.uums.rest.account.api.hystrix.ApplicationsApiHystrix;
import com.kingboy.kbg.uums.rest.account.dto.ApplicationsDTO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Create By 郭金宝 on 2018/6/15.<br>
 */
@FeignClient(name = "${kbg.feign-server.gateway:kbg-gateway}", fallback = ApplicationsApiHystrix.class)
public interface ApplicationsApi {
    /**
     * 根据appid 和 密码 查找应用
     *
     * @param appId     appId
     * @param appSecret appSecret
     * @return
     */
    @RequestMapping(value = "/api/admin/app", method = RequestMethod.GET)
    Result<ApplicationsDTO> getBySecret(@RequestParam(value = "appId") String appId, @RequestParam(value = "appSecret") String appSecret);

}
